/*
 * $Id: nspr_utils.c 11 2009-03-01 04:49:57Z zwell.nosec $
 * $Author: zwell.nosec $
 * http://www.nosec.org
 */
 
/**
@file
*/
#include "nspr_utils.h"

NS_DECLARE(char *) ns_strdup_btw(const char *beg, const char *end)
{
	char *strReturn = NULL;
	
	if(!beg || !end || (beg==end))
		return NULL;
	strReturn = (char *)malloc (end - beg + 1);
	if(!strReturn)
		return NULL;
	memcpy(strReturn, beg, end - beg);
	strReturn[end - beg] = '\0';
	return strReturn;
}
